package com.tz.farmer.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class GoodsInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商户id")
    private Integer businessId;

    @ApiModelProperty(value = "商品id")
    private Integer goodsId;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "商品产地")
    private String goodsPlace;

    @ApiModelProperty(value = "生产时间")
    private String produceTime;

    @ApiModelProperty(value = "统一信用代码")
    private String certificateCode          ;

    @ApiModelProperty(value = "规格")
    private String specs;

    @ApiModelProperty(value = "品牌")
    private String brand;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "检验报告")
    private String inspectionReport;

    @ApiModelProperty(value = "数量/重量")
    private String amount;

    @ApiModelProperty(value = "检测结果")
    private String result;

    @ApiModelProperty(value = "产品图片")
    private String goodsPhoto;

    @ApiModelProperty(value = "交易时间")
    private String tradeTime;

    @ApiModelProperty(value = "社会信用统一代码")
    @TableField(exist = false)
    private String uniscId;

    @ApiModelProperty(value = "产品标识(渔:331001 农:331002)")
    private String property;

    @ApiModelProperty(value = "批次信息")
    private String batchInfo;

    @ApiModelProperty(value = "渔船名称")
    private String fishBoatName;

}